]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
legacyTray: Remove pointer barrier when the tray is hidden
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 21 Mar 2015 18:10:04 +0000 (19:10 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 23 Mar 2015 19:23:01 +0000 (20:23 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=746579

js/ui/legacyTray.js

index 40b47a02a507f0907cdf20528b650fbe4ef54f1e..821dd9dc40e7d0141a3ba756b9b37a5ca076b59a 100644 (file)
@@ -205,11 +205,7 @@ const LegacyTray = new Lang.Class({
             this._horizontalBarrier.y2 == y2)
             return;
 
-        if (this._horizontalBarrier) {
-            this._pressureBarrier.removeBarrier(this._horizontalBarrier);
-            this._horizontalBarrier.destroy();
-            this._horizontalBarrier = null;
-        }
+        this._unsetBarrier();
 
         let directions = (rtl ? Meta.BarrierDirection.NEGATIVE_X : Meta.BarrierDirection.POSITIVE_X);
         this._horizontalBarrier = new Meta.Barrier({ display: global.display,
@@ -219,6 +215,15 @@ const LegacyTray = new Lang.Class({
         this._pressureBarrier.addBarrier(this._horizontalBarrier);
     },
 
+    _unsetBarrier: function() {
+        if (this._horizontalBarrier == null)
+            return;
+
+        this._pressureBarrier.removeBarrier(this._horizontalBarrier);
+        this._horizontalBarrier.destroy();
+        this._horizontalBarrier = null;
+    },
+
     _sync: function() {
         // FIXME: we no longer treat tray icons as notifications
         let allowed = Main.sessionMode.hasNotifications;
@@ -244,12 +249,14 @@ const LegacyTray = new Lang.Class({
                 targetSlide *= CONCEALED_VISIBLE_FRACTION;
         }
 
-        if (this.actor.visible)
+        if (this.actor.visible) {
             Tweener.addTween(this._slideLayout,
                              { slideX: targetSlide,
                                time: REVEAL_ANIMATION_TIME,
                                transition: 'easeOutQuad' });
-        else
+        } else {
             this._slideLayout.slideX = targetSlide;
+            this._unsetBarrier();
+        }
     }
 });